{extend name="Layout/datagrid" /}
{block name="content_header"}
<h1>
    黑名单管理
    <small>advanced tables</small>
</h1>
<ol class="breadcrumb">
    <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
    <li><a href="#">安全</a></li>
    <li class="active">黑名单管理</li>
</ol>
{/block}
{block name="content"}
<div class="box">
    <div class="box-header">
        <ul class="nav nav-tabs">
            {foreach name="tabs" item="vo"}
            <li class="{$vo.active}"><a href="{:url($vo['url'])}">{$vo.title}</a></li>
            {/foreach}
        </ul>
        <div class="row">
            <div class="col-md-5">
                <button type="button" class="btn btn-default navbar-btn xsui-btn-add-dialog" data-url="{:url('edit','category='.$search['category_name'])}" title="新增黑名单">新增</button>
                <button type="button" class="btn btn-danger navbar-btn xsui-btn-multi-delete" data-url="{:url('delete','id=varkey')}">批量删除</button>
                <button type="button" class="btn btn-success navbar-btn xsui-btn-refresh">刷新</button>
            </div>
            <div class="col-md-7">
                <form class="navbar-form navbar-right">
                    <div class="form-group">
                        <input type="text" name="word" class="form-control" placeholder="关键词..." title="内容" value="{$search['word']}">
                    </div>
                    <button type="submit" class="btn btn-default">搜索</button>
                </form>
            </div>
        </div>
    </div>
    <!-- /.box-header -->
    <div class="box-body">
        <table class="xsui-datagrid table table-condensed table-bordered table-striped table-hover">
            <thead>
                <tr>
                    <th><input type="checkbox" class="xsui-btn-checking-all" /></th>
                    <th>#</th>
                    <th>内容</th>
                    <th>解禁时间</th>
                    <th>原因</th>
                    <th>状态</th>
                    <th>创建时间</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                {foreach name="list" item="vo"}
                <tr data-key="{$vo.id}">
                    <td><input type="checkbox" value="{$vo.id}" /></td>
                    <td title="{$vo.id}"></td>
                    <td>{$vo.content}</td>
                    <td>{$vo.release_time}</td>
                    <td>{$vo.reason}</td>
                    <td class="xsui-cell-status"><a href="{:url('changeStatus','id='.$vo['id'].'&status=varstatus')}" data-value="{$vo.status}" title="点击隐藏" class="text-success"><i class="fa fa-check fa-fw"></i></a></td>
                    <td>{$vo.create_time}</td>
                    <td class="xsui-action-td">
                        <div class="btn-group">
                            <a class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" href="#">
                                操作
                                <span class="caret"></span>
                            </a>
                            <ul class="dropdown-menu pull-right" style="min-width: 60px">
                                <li><a href="{:url('edit','id='.$vo['id'])}" class="xsui-btn-edit-dialog" title="编辑黑名单 - {$vo.user_name}"><span class="glyphicon glyphicon-edit"></span>编辑</a></li>
                                <li><a href="{:url('delete','id='.$vo['id'])}" class="xsui-btn-delete" title="删除黑名单 - {$vo.user_name}"><span class="glyphicon glyphicon-remove"></span>删除</a></li>
                            </ul>
                        </div>
                    </td>
                </tr>
                {/foreach}
            </tbody>
        </table>
        {$page}
    </div>
    <!-- /.box-body -->
</div>
<!-- /.box -->
{/block}